package com.tydic.springboot.util;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author: wangkl
 * @date: 2020-03-14 17:45
 * @description:
 */
public class DateUtil {

    public static String dateFormatyyyyMMddHHmmss() {
        Date date = new Date();
        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss sss");
        String dateString = formatter.format(date);
        return dateString;
    }

    public static String dateFormatSSS() {
        Date date = new Date();
        SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmsssss");
        String dateString = formatter.format(date);
        return dateString;
    }
}
